import { defineStore } from "pinia";
import { ref } from "vue";

export const useStore = defineStore('userInfoStore', () => {
  //修改密码验证标记
  const passwordFlag = ref('');

  //修改手机号验证标记
  const mobileFlag = ref('');

  //获取修改密码验证标记
  const setPasswordFlag = (e: string) => {
    passwordFlag.value = e || '';
  }

  //获取修改手机号验证标记
  const setMobileFlag = (e: string) => {
    mobileFlag.value = e || '';
  }

  //清除修改密码验证标记
  const clearPasswordFlag = () => {
    passwordFlag.value = '';
  }

  //清除修改手机号验证标记

  const clearMobileFlag =  () => {
    mobileFlag.value = '';
  }

  return {
    passwordFlag,
    mobileFlag,
    setPasswordFlag,
    clearPasswordFlag,
    setMobileFlag,
    clearMobileFlag,
  }
})